From: Martin Rudalics Date: Wed, 18 Jul 2007 08:54:43 +0000 (+0000) Subject: (change-log-mode): Use fill-nobreak-predicate to X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~421^2~17851 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=cfa1ab4fb219b713df8da5571388e31903ed86f2;p=emacs.git (change-log-mode): Use fill-nobreak-predicate to avoid that filling introduces lines with a single asterisk. --- diff --git a/lisp/add-log.el b/lisp/add-log.el index 3ec00b81b35..0ff82bba2f5 100644 --- a/lisp/add-log.el +++ b/lisp/add-log.el @@ -699,6 +699,11 @@ Runs `change-log-mode-hook'. show-trailing-whitespace t) (set (make-local-variable 'fill-paragraph-function) 'change-log-fill-paragraph) + ;; Avoid that filling leaves behind a single "*" on a line. + (add-hook 'fill-nobreak-predicate + '(lambda () + (looking-back "^\\s *\\*\\s *" (line-beginning-position))) + nil t) (set (make-local-variable 'indent-line-function) 'change-log-indent) (set (make-local-variable 'tab-always-indent) nil) ;; We really do want "^" in paragraph-start below: it is only the